refactor(stack): restore service factory locality - #6086
Conversation
…ack-factory-resource-locality
…-model # Conflicts: # packages/stack/README.md # packages/stack/docs/architecture.md
…ementation # Conflicts: # packages/process-compose/src/Orchestrator.ts # packages/process-compose/src/Orchestrator.unit.test.ts # packages/stack/src/Stack.unit.test.ts
…ctory-resource-locality # Conflicts: # packages/process-compose/src/Orchestrator.ts
…-model # Conflicts: # packages/stack/src/versions.ts
…ctory-resource-locality
…/process-compose-supervisor-cleanup
…/stack-runtime-implementation # Conflicts: # packages/process-compose/src/Orchestrator.ts # packages/process-compose/src/Orchestrator.unit.test.ts
…ctory-resource-locality # Conflicts: # packages/process-compose/docs/architecture.md # packages/process-compose/src/Orchestrator.ts # packages/stack/src/LocalStack.ts
…ack-factory-resource-locality # Conflicts: # packages/process-compose/docs/architecture.md
…ctory-resource-locality
…ack-runtime-implementation # Conflicts: # packages/stack/src/StackBuilder.ts # packages/stack/src/StackBuilder.unit.test.ts
…ctory-resource-locality # Conflicts: # packages/stack/src/StackBuilder.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 858e882b0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…/process-compose-supervisor-cleanup
…ack-runtime-implementation
…ctory-resource-locality
…-model # Conflicts: # packages/stack/src/ServiceActivation.ts # packages/stack/src/StackBuilder.ts # packages/stack/src/StackLifecycleCoordinator.ts
…gent/process-compose-supervisor-cleanup # Conflicts: # packages/process-compose/docs/architecture.md # packages/process-compose/src/Orchestrator.ts # packages/process-compose/src/ServiceTransition.ts # packages/stack/src/ServiceActivation.ts # packages/stack/src/StackBuilder.ts # packages/stack/src/StackLifecycleCoordinator.ts
…-cleanup' into agent/stack-runtime-implementation # Conflicts: # packages/stack/src/ServiceActivation.ts # packages/stack/src/StackLifecycleCoordinator.ts
…on' into agent/stack-factory-resource-locality
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@ed107d60cc3c2e5ada285b88e9b96da5ecab8fa9Preview package for commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60786d568a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…y-resource-locality # Conflicts: # packages/stack/src/LocalStack.ts # packages/stack/src/Stack.unit.test.ts # packages/stack/src/StackBuilder.ts # packages/stack/src/cleanup.ts # packages/stack/src/createStack.ts # packages/stack/src/createStack.unit.test.ts # packages/stack/src/daemon.ts # packages/stack/src/layers.ts # packages/stack/src/services/service-utils.ts
## What changed - Introduces a serializable resolved Functions bundle with absolute paths, per-function policy, static files, and resolved environment values. - Moves project, manifest, and dotenv resolution into config and CLI ownership while keeping stack responsible only for runtime-derived values and ephemeral runtime configuration. - Uses validated JSON reload bodies, preserves the active bundle across repeated reloads, and removes resolved bundle values from daemon startup IPC and durable state. ## Why This makes the stack boundary independent of CLI project conventions and gives direct callers an explicit input model. In detached mode, resolved environment values travel only in the Unix-socket request body and are persisted only in the owner-only ephemeral runtime file. Depends on supabase#6086 and its prerequisite stack architecture chain.
What changed
Why
Service construction and resource identity were split across the builder, individual factories, and fallback cleanup code. Keeping topology in the builder while concentrating executable details and Docker identity in factories makes service definitions easier to change safely, prevents launch and cleanup names from drifting, and ensures failed startup cannot leave an earlier service running.
Depends on #6085 and #6084 (and transitively #6081, #6080, and #6078).